﻿using AiXiu.BLL;
using AiXiu.Model;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AiXiu.WebSite
{
    public partial class UserList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            UserInfo info = new UserInfo();
            var list=info.getList();
            GridView1.DataSource = list;
            GridView1.DataBind();
        }

        protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            var user = e.Row.DataItem as TBUsers;
            if (user!=null)
            {
                if (user.Sex==0)
                {
                    e.Row.BackColor = Color.Red;
                    e.Row.ForeColor = Color.White;
                }
            }
        }
    }
}